home *** CD-ROM | disk | FTP | other *** search
- #include "test.h"
- #pragma hdrstop
-
- void test_CUniformResourceLocator( void )
- {
- CUniformResourceLocator url( "Serial://COM2:9600,n,8,1/Settings.ini" );
-
- if ( url.ProtocolName == "Serial" &&
- url.MachineName == "COM2" &&
- url.PortName == "9600,n,8,1" &&
- url.PathName == "Settings.ini" )
- {
- printf( "CUniformResourceLocator passed\n" );
- }
- else
- {
- printf( "CUniformResourceLocator FAILED!\n" );
- printf( "ProtocolName == \"%s\" when it should be \"Serial\"\n", (LPCTSTR) url.ProtocolName );
- printf( "MachineName == \"%s\" when it should be \"COM2\"\n", (LPCTSTR) url.MachineName );
- printf( "PortName == \"%s\" when it should be \"9600,n,8,1\n", (LPCTSTR) url.PortName );
- printf( "Pathname == \"%s\" when it should be \"Settings.ini\n", (LPCTSTR) url.PathName );
- }
- }
-
-